package com.magnificent.atlantis.client.robot.ui.panel;

import com.magnificent.atlantis.client.robot.RobotContext;
import com.magnificent.atlantis.client.robot.strategies.RobotManagerStrategy;
import com.magnificent.atlantis.client.robot.strategies.RobotStrategy;
import com.magnificent.atlantis.client.robot.ui.configure.RobotConfiguration;

import javax.swing.*;
import java.awt.*;

/**
 * User: Babanin
 * Date: Sep 19, 2009
 * Time: 3:30:56 PM
 */
public class ManagerTabPanel extends AbstractUserTabPanel {
    public ManagerTabPanel(RobotConfiguration configuration) {
        super(configuration);

        initializeControls();
        initializeView();
    }

    private void initializeView() {
        setLayout(new BorderLayout());
    }

    private void initializeControls() {
        logTextPane = new JTextPane();
    }

    protected RobotStrategy initializeRobotStrategy(RobotContext context) {
        return new RobotManagerStrategy(context);
    }

    public void start() {
        robot.start();
        mailer.start();
        scheduler.start();
    }

    public void pause() {
    }

    public void stop() {
    }
}
